data(quasiflow)
qf <- quasiflow[1:1000,1:2]
qf.label <- quasiflow[1:1000,3]*quasiflow[1:1000,4]
qf.prim <- prim.box(x=qf, y=qf.label, threshold=c(0.3, -0.1), threshold.type=0,
verbose=TRUE)
## verbose=TRUE prints out extra informaton about peeling and pasting
summary(qf.prim)
predict(qf.prim, newdata=c(0.6,0.2))
## using median insted of mean for the response y
qf.prim2 <- prim.box(x=qf, y=qf.label, threshold=c(0.5, -0.2),
threshold.type=0, y.fun=median)
summary(qf.prim2)
predict(qf.prim2, newdata=c(0.6,0.2))
Run the code above in your browser using DataLab